package com.meituan.sdk.model.ddzhkh.finance.financeOrderDetail;

import com.meituan.sdk.annotations.ApiMeta;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 查询券详情接口
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzhkh/finance/order/detail",
    businessId = 59,
    apiVersion = "10000",
    apiName = "finance_order_detail",
    needAuth = true
)
public class FinanceOrderDetailRequest implements MeituanRequest<FinanceOrderDetailResponse> {
    /**
    * <p data-diff-id="ct-diff-id-41bc2229-48e0-434d-b677-0f6b05f9f56a"><span style="color: ">券号</span></p>
    */
    @NotBlank(message = "consumeItem不能为空")
    @SerializedName("consumeItem")
    private String consumeItem;
    /**
    * <p data-diff-id="ct-diff-id-c5760f02-5b98-468d-b451-fa47335ae7cb"><span style="color: ">业务类型（1-团购）</span></p>
    */
    @NotNull(message = "productCode不能为空")
    @SerializedName("productCode")
    private Integer productCode;

    public String getConsumeItem() {
        return consumeItem;
    }
    public void setConsumeItem(String consumeItem) {
        this.consumeItem = consumeItem;
    }
    public Integer getProductCode() {
        return productCode;
    }
    public void setProductCode(Integer productCode) {
        this.productCode = productCode;
    }


    @Override
    public MeituanResponse<FinanceOrderDetailResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<FinanceOrderDetailResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "FinanceOrderDetailRequest{" + "consumeItem=" + consumeItem + "," + "productCode=" + productCode + "}";
    }
}
